# -------------greenlet 函数间的切换更加方便--------------------------
# 通过 switch() 随时切换
from greenlet import greenlet
def too2():
    print(898)
    gr1.switch()
    print(34)
def too1():
    print(89)
    gr2.switch()
    print("7897978")
    gr2.switch()
gr1=greenlet(too1)
gr2=greenlet(too2)

# gr1.switch() # 动作的发起端
too1()